﻿@model Mvc.Models.Menu

@{
    ViewBag.Title = "Menus > Edit";
    var options = new AjaxOptions()
                      {
                          Url = Url.Action("Delete", "Menu"),
                          LoadingElementId = "",
                          UpdateTargetId = "content",
                          InsertionMode = InsertionMode.Replace, // <-- Replace the content of DOM element
                          HttpMethod = "POST",


                      };  
}

<h2>Delete</h2>

<h3>Are you sure you want to delete this?</h3>
<fieldset>
    <legend>Menu</legend>

    <div class="display-label">
        @Html.DisplayNameFor(model => model.nombre)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.nombre)
    </div>

    <div class="display-label">
        @Html.DisplayNameFor(model => model.descripcion)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.descripcion)
    </div>

    <div class="display-label">
        @Html.DisplayNameFor(model => model.imagen)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.imagen)
    </div>
</fieldset>

@using (Ajax.BeginForm(options))
{
    @Html.AntiForgeryToken()
    <p>
        <input type="submit" value="Delete" />
        |
        @Html.ActionLink("Back to List", "Index")
    </p>
}
